<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>弹性盒子</title>
    <style>
        .fa{
            display: flex;
            border : 2px solid green;
            height: 500px;
            width: 500px;
        }
        .son{
            border : 2px solid red;
            height: 50px;
            width: 50px;
            margin: auto;
        }
    </style>
</head>
<body>
    <div class="fa">
        <div class="son">我是子元素</div>
    </div>
</body>
</html>